<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>

<!DOCTYPE html>
<html>
	<head>
		<title>编辑课程免费体验</title>
		<meta name="decorator" content="default"/>
		<script type="text/javascript">
			$(function() {
				//初始化表单验证
				$("#inputForm").initValidform();
				
				$('#btnCancel').click(function(){
					var api = top.dialog.get('freeDialog');
					api.close().remove();
				});
				
				/*$('#btnSubmit').click(function(){
					save();
				});*/
			});
			
			function save(){
				/**页面刷新**/
				var win = top;
				if(top.frames && top.frames['mainframe']){
					win = top.frames['mainframe'];
				}
				win.location.reload();
				/**关闭对话框**/
				var api = top.dialog.get('freeDialog');
				api.close().remove();
			}
		</script>
		<style type="text/css">
			body{padding:0px;margin:0px !important;}
		</style>
	</head>
	
	<body>
		${script}
		<form:form id="inputForm" modelAttribute="coursefree" action="${ctx}/qd/coursefree/saveDialog" method="post" class="form-horizontal">
			<form:hidden path="id"/>
			<form:hidden path="courseId"/>
			<div class="tab-content" style="border: none;">
				<dl>
					<dt>家长姓名</dt>
					<dd>
						<form:input path="memberName" htmlEscape="false" maxlength="50" class="required" cssClass="input normal" datatype="*" nullmsg="请输入家长姓名" errormsg="请输入家长姓名" sucmsg=" "/>
						<span class="Validform_checktip">*请输入家长姓名</span>
					</dd>
				</dl>
				<dl>
					<dt>家长手机</dt>
					<dd>
						<form:input path="memberMobile" htmlEscape="false" maxlength="50" class="required" cssClass="input normal" datatype="*" nullmsg="请输入家长手机" errormsg="请输入家长手机" sucmsg=" "/>
						<span class="Validform_checktip">*请输入家长手机</span>
					</dd>
				</dl>
				<dl>
					<dt>宝宝姓名</dt>
					<dd>
						<form:input path="studentName" htmlEscape="false" maxlength="50" class="required" cssClass="input normal" datatype="*" nullmsg="请输入宝宝姓名" errormsg="请输入宝宝姓名" sucmsg=" "/>
						<span class="Validform_checktip">*请输入宝宝姓名</span>
					</dd>
				</dl>
				<dl>
					<dt>宝宝出生日期</dt>
					<dd>
						<div class="date-input">
							<i></i>
							<form:input path="studentBirthday" htmlEscape="false" maxlength="50" class="required" datatype="/^\s*$|^\d{4}\-\d{1,2}\-\d{1,2}\s*$/" onfocus="WdatePicker()" cssClass="input-build normal-build" nullmsg="请输入宝宝出生日期" errormsg="请输入宝宝出生日期" sucmsg=" "/>
						</div>
						<span class="Validform_checktip">*请输入宝宝出生日期</span>
					</dd>
				</dl>
			</div>
			
			<hr style="height:1px;border:none;border-top:1px solid #e4e4e4;">
			
			<!--工具栏-->
			<div class="page-footer" style="padding:0px !important; text-align: center;">
				<div class="btn-wrap">
					<input type="submit" name="btnSubmit" value="提交" id="btnSubmit" class="btn" /> 
					<input name="btnCancel" type="button" value="取消" id="btnCancel" class="btn yellow" />
				</div>
			</div>
			<!--/工具栏-->
		</form:form>
	</body>
</html>

